package com.jnzc.ocr.serv.shop.api.impl;

import com.jnzc.ocr.serv.shop.api.ShopOrderRechargeApi;
import com.jnzc.ocr.serv.shop.entity.ShopOrder;
import com.jnzc.ocr.serv.shop.entity.ShopOrderRecharge;
import com.jnzc.ocr.serv.shop.service.ShopOrderRechargeService;
import com.jnzc.ocr.serv.shop.vo.ShopOrderRechargeCreateVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangcm
 * @version 1.0, 2017-10-06
 */
@RestController
public class ShopOrderRechargeApiImpl implements ShopOrderRechargeApi {

    @Autowired
    private ShopOrderRechargeService shopOrderRechargeService;

    @Override
    public ShopOrderRecharge find(Long orderId) {
        return shopOrderRechargeService.find(orderId, null);
    }

    @Override
    public ShopOrder create(@RequestBody ShopOrderRechargeCreateVo createVo) {
        return shopOrderRechargeService.create(createVo);
    }
}
